#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>

int main()
{
	int shmid = 0;
	char buf[1024];
	
	shmid = shm_open("beyond", O_RDWR, 0644);
	printf("shmid=%d\n", shmid);

	read(shmid, buf, sizeof buf);
	printf("buf=%s\n", buf);

	close(shmid);

	return 0;
}
